#include <stdio.h>
#include "Definitions.h"
#include "Simulator.h"
#include "Outports.h"
#include "Inports.h"
#include "Controllers.h"
#include "Signals.h"
#include "Registers.h"
#include "Tracers.h"
#include "Displays.h"
#include "OutportDynamicList.h"

using namespace std;






void OutPort_paddle_paddle_y::Evaluate(void)
{
      switch(Simulator::controller_ctrl_paddle->CurrentControlStep)
      {
      case 0:
    this->Value->ValueCopy(Simulator::register_paddle_location_y->StoredValue);
        break;
      default:
    throw 
    new ApplicationException("Internal Error - no definer for outport");
      }

    /* Mark this entity as valid for this cycle  */
    this->Cycle = Simulator::CurrentCycle;
}

void OutPort_paddle_paddle_y::Initialize(void)
{
    this->Value = new Integer(16, true);
    this->Value = new Integer(16, true);
    _Color = Color::White;
DependentOutports_ControlStep_0 = new OutportDynamicList();
    this->DependentOutports_ControlStep_0->push_back(Simulator::outPort_test_paddle_ball_incomming);
}

OutportDynamicList* OutPort_paddle_paddle_y::GetDependentOutports(void)
{
      switch(Simulator::controller_ctrl_paddle->CurrentControlStep)
      {
      case 0:
    return this->DependentOutports_ControlStep_0;
      default:
    throw 
    new ApplicationException("Internal Error");
      }
}









void OutPort_test_paddle_ball_incomming::Evaluate(void)
{
      switch(Simulator::controller_test_paddle_ctrl->CurrentControlStep)
      {
      case 0:
    this->Value->ValueCopy(this->Constant_1);
        break;
      case 1:
    this->Value->ValueCopy(this->Constant_1);
        break;
      case 2:
    this->Value->ValueCopy(this->Constant_1);
        break;
      default:
    throw 
    new ApplicationException("Internal Error - no definer for outport");
      }

    /* Mark this entity as valid for this cycle  */
    this->Cycle = Simulator::CurrentCycle;
}

void OutPort_test_paddle_ball_incomming::Initialize(void)
{
    this->Value = new Integer(1, false);
    this->Constant_1 = new Integer(2, "1", false);
    this->Value = new Integer(1, false);
    this->Constant_1 = new Integer(2, "1", false);
    _Color = Color::White;
DependentOutports_ControlStep_0 = new OutportDynamicList();
DependentOutports_ControlStep_1 = new OutportDynamicList();
DependentOutports_ControlStep_2 = new OutportDynamicList();
}

OutportDynamicList* OutPort_test_paddle_ball_incomming::GetDependentOutports(void)
{
      switch(Simulator::controller_test_paddle_ctrl->CurrentControlStep)
      {
      case 0:
    return this->DependentOutports_ControlStep_0;
      case 1:
    return this->DependentOutports_ControlStep_1;
      case 2:
    return this->DependentOutports_ControlStep_2;
      default:
    throw 
    new ApplicationException("Internal Error");
      }
}











void OutPort_test_paddle_ball_y::Evaluate(void)
{
      switch(Simulator::controller_test_paddle_ctrl->CurrentControlStep)
      {
      case 0:
    this->Value->ValueCopy(this->Constant_10);
        break;
      case 1:
    this->Value->ValueCopy(this->Constant_16);
        break;
      case 2:
    this->Value->ValueCopy(this->Constant_12);
        break;
      default:
    throw 
    new ApplicationException("Internal Error - no definer for outport");
      }

    /* Mark this entity as valid for this cycle  */
    this->Cycle = Simulator::CurrentCycle;
}

void OutPort_test_paddle_ball_y::Initialize(void)
{
    this->Value = new Integer(16, true);
    this->Constant_10 = new Integer(4, "10", false);
    this->Constant_16 = new Integer(5, "16", false);
    this->Constant_12 = new Integer(4, "12", false);
    this->Value = new Integer(16, true);
    this->Constant_10 = new Integer(4, "10", false);
    this->Constant_16 = new Integer(5, "16", false);
    this->Constant_12 = new Integer(4, "12", false);
    _Color = Color::White;
DependentOutports_ControlStep_0 = new OutportDynamicList();
DependentOutports_ControlStep_1 = new OutportDynamicList();
DependentOutports_ControlStep_2 = new OutportDynamicList();
}

OutportDynamicList* OutPort_test_paddle_ball_y::GetDependentOutports(void)
{
      switch(Simulator::controller_test_paddle_ctrl->CurrentControlStep)
      {
      case 0:
    return this->DependentOutports_ControlStep_0;
      case 1:
    return this->DependentOutports_ControlStep_1;
      case 2:
    return this->DependentOutports_ControlStep_2;
      default:
    throw 
    new ApplicationException("Internal Error");
      }
}

